import { ApiVersoin } from '@/common/enums/httpEnum'

const Url = {
  getListData: `/repair/new-list-data`,
  getProjectRooms: `/repair/get-project-rooms`,
  getProjectItems: `/repair/get-project-items`,
  getWillTime: `${ApiVersoin.V4}/online-repair/get-will-time`,
  postRepair: `/repair/post-repair`,
  getEvalution: `${ApiVersoin.V4}/evaluate/get-detail`,
  getRepairDetail: `/repair/detail`,
  postReopen: `${ApiVersoin.V4}/online-repair/post-reopen`,
  evaluateTags: `${ApiVersoin.V3}/evaluate/get-tags`,
  replyAll: `${ApiVersoin.V3}/evaluate/reply-all`,
}

export const getListData = (params) => uni.$uv.http.get(Url.getListData, { params, custom: { showLoading: true } })
export const getProjectRooms = (params) => uni.$uv.http.get(Url.getProjectRooms, { params, custom: { showLoading: true } })
export const getProjectItems = (params) => uni.$uv.http.get(Url.getProjectItems, { params, custom: { showLoading: true } })
export const getWillTime = (params) => uni.$uv.http.get(Url.getWillTime, { params, custom: { showLoading: true } })
export const postRepair = (data) => uni.$uv.http.post(Url.postRepair, data, { custom: { showLoading: true } })
export const getEvalution = (data) => uni.$uv.http.get(Url.getEvalution, { data, custom: { showLoading: true } })
export const getRepairDetail = (data) => uni.$uv.http.get(Url.getRepairDetail, { data, custom: { showLoading: true } })
export const postReopen = (data) => uni.$uv.http.post(Url.postReopen, data, { custom: { showLoading: true } })
export const evaluateTags = (data) => uni.$uv.http.get(Url.evaluateTags, { data, custom: { showLoading: true } })
export const replyAll = (data) => uni.$uv.http.post(Url.replyAll, data, { custom: { showLoading: true } })
